package cn.hhj.utils;

import cn.hhj.domain.User;
import com.alibaba.csp.sentinel.slots.block.BlockException;
import org.springframework.web.bind.annotation.PathVariable;

public class LimitExceptionUtil {
    // 其他类的托底方法
    public static User handleException(@PathVariable("id") Long id, BlockException e){
        e.printStackTrace();
        return new User(-1L,"限流了","当前请求过大，请稍后重试！");
    }
}

